#ifndef STORAGE_PACKAGE_STORAGE
#define STORAGE_PACKAGE_STORAGE

#include "Storage/StorageBase.hpp"
#include <boost/any.hpp>

namespace Model { class Project; class Package;}

namespace Storage
{

/// @ingroup Storage
/// @brief It specializes the generic storage to deal with packages.
class STORAGE_API PackageStorage: public StorageBase
{
public:
	/// @see StorageBase::StorageBase( StorageFactory&)
	PackageStorage( StorageFactory& factory);

	/// @brief It should load the package corresponding to the given project.
	virtual void loadPackages( Model::Project& prjToLoad) = 0;

	/// @brief It looks for the package with the specified stored ID between the children, grandchildren, etc.
	/// @param pCurPackage the parent package to start looking for the stored identifier.
	/// @param storedID the stored identifier to look for.
	/// @return the package with the specified stored identifier or NULL if no package was found.
	///
	/// Since there is no information about the type of the stored identifier at this level of abstraction, subclasses 
	///	need to implement this method.
	virtual Model::Package* deepSearchByStoredID( Model::Package* pCurPackage, const boost::any& storedID) const = 0;
};
	
} // namespace Storage

#endif // STORAGE_PACKAGE_STORAGE